namespace QMVnSoft.Lists
{
    using QMVnSoft.Controls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Drawing;

    public class FormDmMDSDLister : FormListLister
    {
        private IContainer components;

        public FormDmMDSDLister()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            base.SuspendLayout();
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.ClientSize = new Size(0x2bd, 0x10a);
            base.LocalFieldCount = 0;
            base.LocalFieldName = "MA_MDSD";
            base.LocalTableName = "DMMDSD";
            base.Name = "FormDmMDSDLister";
            base.OrderFieldNames = "MA_MDSD";
            this.Text = "Danh mục mục đích sử dụng tài sản, công cụ";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public override bool OnAdd()
        {
            base.LocalFormEditor = new FormDmMDSDEditor();
            return base.OnAdd();
        }

        public override bool OnEdit()
        {
            base.LocalFormEditor = new FormDmMDSDEditor();
            return base.OnEdit();
        }

        public override void OnFillData()
        {
            object[][] objArray = new object[2][];
            object[] objArray2 = new object[4];
            objArray2[0] = "Ma_MDSD";
            objArray2[1] = "Mã mục đích";
            objArray2[2] = "C";
            objArray[0] = objArray2;
            object[] objArray3 = new object[4];
            objArray3[0] = "Ten_MDSD";
            objArray3[1] = "Tên mục đích sử dụng";
            objArray3[2] = "C";
            objArray[1] = objArray3;
            base.ColNames = objArray;
            base.OnFillData();
        }

        public override void OnRefresh()
        {
            base.LocalDataSet = new DmMDSDDataAccess().GetDataSet();
            base.OnRefresh();
        }
    }
}

